From: Jan Beulich Date: Fri, 1 Jul 2022 07:57:19 +0000 (+0200) Subject: xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses() X-Git-Tag: archive/raspbian/5.10.127-2+rpi1^2~20 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/?a=commitdiff_plain;h=aa86d80b6aaaaa28ade0cd00ec4cbf2d8a1c3f79;p=linux.git xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses() Origin: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?id=547b7c640df545a344358ede93e491a89194cdfa Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2022-33743 commit f63c2c2032c2e3caad9add3b82cc6e91c376fd26 upstream. The commit referenced below moved the invocation past the "next" label, without any explanation. In fact this allows misbehaving backends undue control over the domain the frontend runs in, as earlier detected errors require the skb to not be freed (it may be retained for later processing via xennet_move_rx_slot(), or it may simply be unsafe to have it freed). This is CVE-2022-33743 / XSA-405. Fixes: 6c5aa6fc4def ("xen networking: add basic XDP support for xen-netfront") Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross Signed-off-by: Greg Kroah-Hartman Gbp-Pq: Topic bugfix/all Gbp-Pq: Name xen-netfront-restore-__skb_queue_tail-positioning-in.patch --- diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index bae3ad139f0..569f3c8e7b7 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -1096,8 +1096,10 @@ static int xennet_get_responses(struct netfront_queue *queue, } } rcu_read_unlock(); -next: + __skb_queue_tail(list, skb); + +next: if (!(rx->flags & XEN_NETRXF_more_data)) break;